package com.hongyuan.venue.ui.home.view_mode;

import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;
import com.hongyuan.mvvmhabitx.binding.command.BindingAction;
import com.hongyuan.mvvmhabitx.binding.command.BindingCommand;
import com.hongyuan.venue.base.ItemViewModel;
import com.hongyuan.venue.ui.home.activity.ScheduledActivity;
import com.hongyuan.venue.ui.home.beans.Venue;

public class HomeScheduledItemViewModel extends ItemViewModel<HomeScheduledViewModel> {

    public ObservableField<Venue.GcListBean.TypeBean> entity = new ObservableField<>();

    public HomeScheduledItemViewModel(@NonNull HomeScheduledViewModel viewModel, Venue.GcListBean.TypeBean bean) {
        super(viewModel);

        entity.set(bean);
    }

    //去预约
    public BindingCommand goDetails = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            Bundle bundle = new Bundle();
            bundle.putString("gc_id",viewModel.gcId.get());
            viewModel.startActivity(ScheduledActivity.class,bundle);
        }
    });

}
